home *** CD-ROM | disk | FTP | other *** search
-
- TextEntry Library
- =================
-
- V1.05
-
- Last Updated 7/1/95
-
- This library is freeware - copy it - modify it whatever - but If you do use
- it I would like some form of credit given in the program/documentation.
-
- NOTE: YOU MUST HAVE THE ELMORELIB LIBRARY FOR THESE FUNCTIONS TO WORK!
- PLEASE CHECK THE CODE FOR DETAILS.
-
- FUNCTIONS
- =========
-
- TextEntrySetup{GadgetList,FileName$,Shape}
- ==========================================
-
- The TextEntry routine uses two little shapegadgets for the up and down
- arrows, and this little function sets up the loading of the Gfx for those.
- The Gfx are contained in the file TextEntry.Gfx. This function can be used
- to load those Gfx by specifying the filename (including path) and the shape
- number to load the up gadget into - the down gadget will be in Shape+1.
- GadgetList is just a spare GadgetList that you have that the TextEntry window
- can use.
- If you incorporate the up/down gadgets into your own shape file, then you
- should not specify a filename - ie FileName$="", and specify with Shape the
- Shape which you have loaded them as. The two shapes MUST be kept in the same
- order and next to each other.
- This function was changed in V1.01 so that it no longer changes the
- Borderpens setting - this was originally set just for WB2+ machines. It is
- best if you always set it before setting up gadgets, for WB2+ it is
-
- BorderPens 2,1
-
- and for WB1.3 it is
-
- BorderPens 1,2
-
- It is easy to set up a routine that tests for what ROM we are using with
- ExecVersion<=35 (i think) for 1.3 and lower, and then it can adjust the
- display correctly.
- If you cant work it out, such code would look something like...
-
- If ExecVersion<=35
- Borderpens 1,2
- Else
- Borderpens 2,1
- Endif
-
- TextEntryPostion{x,y,w,h}
- =========================
-
- This function will postion the window at the specified screen coordinates
- with the specified width and height (actual window size NOT text lines.
- Specifying any of these as -1 will leave their values unchanged, thus leaving
- those things as they were last left or as the default. This does NOT need to
- be called.
-
- result$=TextEntry{Window,Title$,EditText$,MaxChars}
- ===================================================
-
- This is the actual routine - Window is the Window number that will be used,
- opening on the current screen. Title$ is the title of the window, and
- EditText$ is the text to be edited. MaxChars is the Maximum number of
- characters that may be entered.
- Please note that there can be a lag of the key repeat on slower machines
- when using exceedingly large windows (on my 1200, 4MB Fast RAM, '020 it only gets
- lagged if the window is full screen (640x256). As it is unlikely these sizes
- will be required, this odes not pose a massive problem, but I am trying to
- optimize the screen updating part of the code - if anyone can improve on my code
- LET ME KNOW!!! - I changed everything I can think in V1.01 to get it faster!
-
- AUTHOR
- ======
-
- Contact me (Mark Tiffany) at
-
- 37 Norfolk Road
- Littlehampton
- West Sussex
- BN17 5PW
-
- or on PHY93003@bham.ac.uk during University term times.
-
- UPDATES
- =======
-
- V1.05 7/1/95
- =====
- Font sensitivity didnt work, so its no longer present. Sorry.
-
- V1.04 6/10/94
- =====
- Now font sensitive (I hope!) - should now the system font happily and fit the
- text in correctly, draw gadgets ok, etc.
-
- V1.03 8/9/94
- =====
- Window now cannot be sized smaller than the minimum (If you've used older
- versions then you'll know what I mean).
-
- V1.02 21/7/94
- =====
- Text update improved again. Minor bug that occurrred when calling the
- routine many times removed.
-
- V1.01 29/6/94
- =====
- Text update improved - less lag in really large windows.
- BorderPens command removed from SETUP, so now you should set it up, and
- they will not be changed by the SETUP command.
- ESC now quits the editing window - ie hits Cancel.
-
- V1.00
- =====
- Funnily enough this is the original. Caught you out there didnt I?
-
-
-